<script>
export default {
  name: 'Filter',
  props: ['filter'],
  watch: {
    // filter: {
    //   handler() {
    //     this.updateStyle();
    //   },
    //   immediate: true,
    //   deep: true,
    // }
  },
  methods: {
    updateStyle(layer) {
      const { filter } = this;
      if (!layer) {
        return
      }
      if (filter.field) {
        layer.filter(filter.field, filter.values);
      }
    },
  },
}
</script>